package com.antonauoja.javaril;

public class Credentials {

    private String username;
	private String password;
    private String apikey;
  
    public Credentials() {}
    
    public Credentials(String username, String password, String apikey) {
    	this.username = username;
    	this.password = password;
    	this.apikey = apikey;
    }
   
	public void setUser(String username, String password) {
		this.username = username;
    	this.password = password;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getApiKey() {
		return apikey;
	}

	public void setApiKey(String apikey) {
		this.apikey = apikey;
	}

	public boolean validate() {

		if (username.isEmpty() || username == null)
			return false;
		if (password.isEmpty() || password == null)
			return false;
		if (apikey.isEmpty() || apikey == null)
			return false;
		return true;
	}
}
